#! /bin/sh
# shell for running unif2 --- uniformly sampled Cshot model  
set -v

nx=1 nz=101 dz=15 fz=.0
ninf=3 npmax=201

unif2 <flatmodel ninf=$ninf npmax=$npmax \
        nz=$nz dz=$dz fz=$fz nx=$nx \
	        v00=2000,3000,5000,7500 >vfile 

out=vfiles.a
tmp1=tmp1
tmp2=tmp2
tmp3=tmp3

n1=101  d1=15   r1=75 
n2=3    d2=2000 r2=0
n3=3    d3=2000 r3=0

>$tmp1
cat vfile vfile  vfile vfile vfile  vfile vfile vfile  vfile>>$tmp1

smooth3d<$tmp1 n1=$n1 n2=$n2 n3=$n3\
	d1=$d1 d2=$d2 d3=$d3 \
	r1=$r1 r2=$r2 r3=$r3 slowness=1>$tmp2

smooth3d<$tmp2 n1=$n1 n2=$n2 n3=$n3\
	d1=$d1 d2=$d2 d3=$d3 \
	r1=$r1 r2=$r2 r3=$r3 slowness=1>$tmp3

b2a<$tmp3 n1=1>$out

rm -f  $tmp1 $tmp2 $tmp3 

